-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in get_structured_config_data: check for dict subclass data #653
Conversation
def test_dict_subclass_data_preserved_upon_node_creation(self, module: Any) -> None: | ||
src = module.DictSubclass.Str2Str() | ||
src["baz"] = "qux" | ||
cfg = OmegaConf.structured(src) | ||
assert cfg.baz == "qux" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If run against the master branch, the above test raises ConfigAttributeError: Missing key baz
.
This PR addresses the error by inspecting for dict subclass data within the get_attr_data
and get_dataclass_data
functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like there is a new conflict.
Should be ready to go :) |
Closes #584
TODO:
test_errors.py
for the newtry: ... except ValidationError: ...
code path.